import $r from '@/utils/request'

export async function fetchContractType(params = {}) {
  return $r('/Amaidan-Merchants-Web/merchants/busContractType/selectContractType', {
    method: 'GET',
    params,
  })
}
export async function saveContractType(params = {}) {
  return $r('/Amaidan-Merchants-Web/merchants/busContractType/saveContractType', {
    method: 'POST',
    data: params,
  })
}
export async function saveContract(params = {}) {
  return $r('/Amaidan-Merchants-Web/merchants/busContractInfo/saveContractInfo', {
    method: 'POST',
    data: params,
  })
}
export async function fetchContract(params = {}) {
  return $r('/Amaidan-Merchants-Web/merchants/busContractInfo/contractInfoList', {
    method: 'GET',
    params,
  })
}
export async function deleteContract(params = {}) {
  return $r('/Amaidan-Merchants-Web/merchants/busContractInfo/deleteContractInfo', {
    method: 'POST',
    data: params,
  })
}
export async function getContractTypes(params = { pageNo: 1, pageSize: 99999, status: 1 }) {
  return $r('/Amaidan-Merchants-Web/merchants/busContractType/selectContractType', {
    method: 'GET',
    params,
  })
}
export async function examineContract(params = {}) { // 审批合同
  return $r('/Amaidan-Merchants-Web/merchants/busContractExamine/updateContractExamine', {
    method: 'GET',
    params,
  })
}
